package db

const TableNameUserNotice = TablePrefix + "user_notice"

type UserNotice struct {
	BaseModel
	UID         uint   `gorm:"column:uid;type:int(11);default:0;comment:模板id" json:"uid" form:"uid"`                                 // 模板id
	Title       string `gorm:"column:title;type:varchar(250);default:'';comment:标题" json:"title" form:"title"`                       // 标题
	Content     string `gorm:"column:content;type:longtext;comment:内容" json:"content" form:"content"`                                // 内容
	ReadTime    XTime  `gorm:"column:read_time;type:datetime;comment:阅读时间" json:"read_time" form:"read_time"`                        // 阅读时间
	Status      bool   `gorm:"column:status;type:tinyint(1);default:0;comment:已读,未读" json:"status" form:"status"`                    // 已读,未读
	IsReceive   int    `gorm:"column:is_receive;type:tinyint(1);default:0;comment:0无,1待领取,2已领取" json:"is_receive" form:"is_receive"` // 0无,1待领取,2已领取
	ReceiveID   uint   `gorm:"column:receive_id;type:int(11);default:0;comment:领取id" json:"receive_id" form:"receive_id"`            // 领取id
	ReceiveTime XTime  `gorm:"column:receive_time;type:datetime;comment:领取时间" json:"receive_time" form:"receive_time"`               // 领取时间
}

func (*UserNotice) TableName() string {
	return TableNameUserNotice
}
